using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TerritoryDesignTools._Analysis
{
    /// <summary>
    /// <para>Set Territory Distance Parameters</para>
    /// <para>Defines the type of distance calculation or distance constraints to use when creating territories.</para>
    /// <para>定义创建领土时要使用的距离计算或距离约束的类型。</para>
    /// </summary>    
    [DisplayName("Set Territory Distance Parameters")]
    public class SetTerritoryDistanceParameters : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public SetTerritoryDistanceParameters()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_territory_solution">
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// </param>
        /// <param name="_level">
        /// <para>Level</para>
        /// <para>The level to which the distance parameters will be applied.</para>
        /// <para>将应用距离参数的级别。</para>
        /// </param>
        public SetTerritoryDistanceParameters(object _in_territory_solution, object _level)
        {
            this._in_territory_solution = _in_territory_solution;
            this._level = _level;
        }
        public override string ToolboxName => "Territory Design Tools";

        public override string ToolName => "Set Territory Distance Parameters";

        public override string CallName => "td.SetTerritoryDistanceParameters";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_territory_solution, _level, _distance_type.GetGPValue(), _units.GetGPValue(), _max_radius, _buffer_distance, _min_distance, _out_territory_solution, _network_datasource, _build_index.GetGPValue(), _travel_direction.GetGPValue(), _time_of_day, _time_zone.GetGPValue(), _search_tolerance];

        /// <summary>
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_territory_solution { get; set; }


        /// <summary>
        /// <para>Level</para>
        /// <para>The level to which the distance parameters will be applied.</para>
        /// <para>将应用距离参数的级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _level { get; set; }


        /// <summary>
        /// <para>Distance Type</para>
        /// <para><xdoc>
        ///   <para>Specifies how distance is calculated based on the method of travel.</para>
        ///   <bulletList>
        ///     <bullet_item>Straight line—Straight-line, or Euclidean distance, is used as the distance measure. This is the default.</bullet_item><para/>
        ///   </bulletList>
        ///   <bulletList>
        ///     <bullet_item>Additional distance types (travel modes—for example, Driving Time, Driving Distance) will be dependent on the available network dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何根据行驶方法计算距离。</para>
        ///   <bulletList>
        ///     <bullet_item>直线 - 直线或欧几里得距离用作距离测量。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        ///   <bulletList>
        ///     <bullet_item>其他距离类型（出行模式，例如，行驶时间、行驶距离）将取决于可用的网络数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Distance Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _distance_type_value? _distance_type { get; set; } = null;

        public enum _distance_type_value
        {
            /// <summary>
            /// <para>Straight line</para>
            /// <para>Straight line—Straight-line, or Euclidean distance, is used as the distance measure. This is the default.</para>
            /// <para>直线 - 直线或欧几里得距离用作距离测量。这是默认设置。</para>
            /// </summary>
            [Description("Straight line")]
            [GPEnumValue("STRAIGHT_LINE")]
            _STRAIGHT_LINE,

        }

        /// <summary>
        /// <para>Measure Units</para>
        /// <para>Specifies the type of measuring units that will be used.</para>
        /// <para>指定将使用的测量单位的类型。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Measure Units")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _units_value? _units { get; set; } = null;

        public enum _units_value
        {
            /// <summary>
            /// <para>Meters</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Meters")]
            [GPEnumValue("METERS")]
            _METERS,

            /// <summary>
            /// <para>Miles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Miles")]
            [GPEnumValue("MILES")]
            _MILES,

            /// <summary>
            /// <para>Nautical Miles</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Nautical Miles")]
            [GPEnumValue("NAUTICAL_MILES")]
            _NAUTICAL_MILES,

            /// <summary>
            /// <para>Kilometers</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Kilometers")]
            [GPEnumValue("KILOMETERS")]
            _KILOMETERS,

            /// <summary>
            /// <para>Yards</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Yards")]
            [GPEnumValue("YARDS")]
            _YARDS,

            /// <summary>
            /// <para>Feet</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Feet")]
            [GPEnumValue("FEET")]
            _FEET,

            /// <summary>
            /// <para>Inches</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Inches")]
            [GPEnumValue("INCHES")]
            _INCHES,

            /// <summary>
            /// <para>Decimeters</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Decimeters")]
            [GPEnumValue("DECIMETERS")]
            _DECIMETERS,

            /// <summary>
            /// <para>Centimeters</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Centimeters")]
            [GPEnumValue("CENTIMETERS")]
            _CENTIMETERS,

            /// <summary>
            /// <para>Millimeters</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Millimeters")]
            [GPEnumValue("MILLIMETERS")]
            _MILLIMETERS,

            /// <summary>
            /// <para>Decimal Degrees</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Decimal Degrees")]
            [GPEnumValue("DECIMAL_DEGREES")]
            _DECIMAL_DEGREES,

            /// <summary>
            /// <para>Minutes</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Minutes")]
            [GPEnumValue("MINUTES")]
            _MINUTES,

            /// <summary>
            /// <para>Hours</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Hours")]
            [GPEnumValue("HOURS")]
            _HOURS,

            /// <summary>
            /// <para>Days</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Days")]
            [GPEnumValue("DAYS")]
            _DAYS,

            /// <summary>
            /// <para>Seconds</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Seconds")]
            [GPEnumValue("SECONDS")]
            _SECONDS,

        }

        /// <summary>
        /// <para>Maximum Territory Radius</para>
        /// <para>The maximum radius of the territory.</para>
        /// <para>领土的最大半径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Territory Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _max_radius { get; set; } = null;


        /// <summary>
        /// <para>Territory Buffer Distance</para>
        /// <para>The radius of the territory buffer.</para>
        /// <para>区域缓冲区的半径。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Territory Buffer Distance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _buffer_distance { get; set; } = null;


        /// <summary>
        /// <para>Minimum Distance Between Centers</para>
        /// <para>The minimum distance between territory centers.</para>
        /// <para>区域中心之间的最小距离。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Minimum Distance Between Centers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double? _min_distance { get; set; } = null;


        /// <summary>
        /// <para>Updated Territory Solution</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_territory_solution { get; set; }


        /// <summary>
        /// <para>Network Data Source</para>
        /// <para>The network dataset on which the network distance calculation will be performed.</para>
        /// <para>将对其执行网络距离计算的网络数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Network Data Source")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _network_datasource { get; set; } = null;


        /// <summary>
        /// <para>Build Network Index</para>
        /// <para><xdoc>
        ///   <para>Specifies whether a network index will be built. A network index will improve performance when solving the territory solution.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—A network index will be built. This is the default.</bullet_item><para/>
        ///     <bullet_item>Unchecked—A network index will not be built.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是否生成网络索引。在求解区域解决方案时，网络索引将提高性能。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 - 将构建网络索引。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>未选中 - 将不构建网络索引。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Build Network Index")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _build_index_value _build_index { get; set; } = _build_index_value._true;

        public enum _build_index_value
        {
            /// <summary>
            /// <para>BUILD_INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("BUILD_INDEX")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>DO_NOT_BUILD_INDEX</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("DO_NOT_BUILD_INDEX")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Travel Direction</para>
        /// <para><xdoc>
        ///   <para>Specifies the direction of travel between stores and customers.</para>
        ///   <bulletList>
        ///     <bullet_item>Toward Stores—Direction of travel will be from customers to stores. This is the default.</bullet_item><para/>
        ///     <bullet_item>Away from Stores—Direction of travel will be from stores to customers.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定商店和客户之间的行进方向。</para>
        ///   <bulletList>
        ///     <bullet_item>朝向商店 - 行进方向将从客户到商店。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>远离商店 - 行进方向将从商店到客户。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Travel Direction")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _travel_direction_value? _travel_direction { get; set; } = null;

        public enum _travel_direction_value
        {
            /// <summary>
            /// <para>Toward Stores</para>
            /// <para>Toward Stores—Direction of travel will be from customers to stores. This is the default.</para>
            /// <para>朝向商店 - 行进方向将从客户到商店。这是默认设置。</para>
            /// </summary>
            [Description("Toward Stores")]
            [GPEnumValue("TOWARD_STORES")]
            _TOWARD_STORES,

            /// <summary>
            /// <para>Away from Stores</para>
            /// <para>Away from Stores—Direction of travel will be from stores to customers.</para>
            /// <para>远离商店 - 行进方向将从商店到客户。</para>
            /// </summary>
            [Description("Away from Stores")]
            [GPEnumValue("AWAY_FROM_STORES")]
            _AWAY_FROM_STORES,

        }

        /// <summary>
        /// <para>Time of Day</para>
        /// <para>Specifies the time and date when calculating distance.</para>
        /// <para>指定计算距离时的时间和日期。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time of Day")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _time_of_day { get; set; } = null;


        /// <summary>
        /// <para>Time Zone</para>
        /// <para><xdoc>
        ///   <para>Specifies the time zone of the Time of Day parameter.</para>
        ///   <bulletList>
        ///     <bullet_item>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</bullet_item><para/>
        ///     <bullet_item>UTC—Coordinated universal time (UTC) will be used.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定 Time of Day 参数的时区。</para>
        ///   <bulletList>
        ///     <bullet_item>位置时区—将使用区域所在的时区。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>UTC—将使用协调世界时 （UTC）。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Time Zone")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _time_zone_value? _time_zone { get; set; } = null;

        public enum _time_zone_value
        {
            /// <summary>
            /// <para>Time Zone at Location</para>
            /// <para>Time Zone at Location—The time zone in which the territories are located will be used. This is the default.</para>
            /// <para>位置时区—将使用区域所在的时区。这是默认设置。</para>
            /// </summary>
            [Description("Time Zone at Location")]
            [GPEnumValue("TIME_ZONE_AT_LOCATION")]
            _TIME_ZONE_AT_LOCATION,

            /// <summary>
            /// <para>UTC</para>
            /// <para>UTC—Coordinated universal time (UTC) will be used.</para>
            /// <para>UTC—将使用协调世界时 （UTC）。</para>
            /// </summary>
            [Description("UTC")]
            [GPEnumValue("UTC")]
            _UTC,

        }

        /// <summary>
        /// <para>Search Tolerance</para>
        /// <para><xdoc>
        ///   <para>The search tolerance to be used for locating territories on the network. Territories that are outside the search tolerance will be left unlocated.</para>
        ///   <para>This parameter requires a distance value and units for the tolerance. The default value is 5000 meters.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>用于在网络上定位区域的搜索容差。超出搜索容差的区域将保持未定位状态。</para>
        ///   <para>此参数需要距离值和公差单位。默认值为 5000 米。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Search Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _search_tolerance { get; set; } = null;


        public SetTerritoryDistanceParameters SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}